<link href="<%=request.getContextPath() %>/css/bootstrap-3.1.1.css" rel="stylesheet">	
<link href="<%=request.getContextPath() %>/css/bootstrap-theme-3.1.1.css" rel="stylesheet">
<link href="<%=request.getContextPath() %>/css/offcanvas.css" rel="stylesheet">   
<script src="<%=request.getContextPath() %>/js/jquery-1.10.2.js"></script>
<script src="<%=request.getContextPath() %>/js/bootstrap-3.1.1.js"></script>

<div class="panel-body">
	<form id="form1" name="form1" method="post" action="<%=request.getContextPath() %>/ComprobanteListar">
		<button class="btn btn-success" type="submit" style="width: 100px;">Refresh</button>
	</form>	
   		<h3 style="color: red;">${MENSAJEERROR }</h3>
		<div>
			<table id="mytable" class="table table-striped" onclick="">   
				<thead>
					<th class="success">Id</th>
				    <th class="success">Fecha</th>
				    <th class="success">Codigo Dueno</th>
				    <th class="success">Codigo Paciente</th>
				    <th class="success">Ver detalle</th>
				    
                </thead>
		  		<tbody>
		  			<%@page import="java.util.*, ranveterinaria.modelo.ComprobanteCabeceraModelo" %>
					<%
						Collection<ComprobanteCabeceraModelo> arreglo = (ArrayList<ComprobanteCabeceraModelo>)request.getAttribute("arreglo");
						if(arreglo != null) {
								for(ComprobanteCabeceraModelo x : arreglo) {
						%>  
		  					<tr>
		  					<td><% out.print(x.getIdComprobante()); %></td>
						    <td><% out.print(x.getFechaRegistro()); %></td>
						    <td><% out.print(x.getDuenoModelo().getCodigoDueno()); %></td>
						    <td><% out.print(x.getPacienteModelo().getCodigoPac()); %></td>
		    					
		   				 	</tr>
						<% }  
		  				} %>
 	
				</tbody>
			</table>

			<div class="clearfix"></div>		
		</div>
</div>


<script type="text/javascript">
	function editar(CodigoDoctor,NombreDoctor,ApePatDoctor,ApeMatDoctor,EmailDoctor,TlfDoctor,BolAdminDoctor) {
		document.forms.formEditar.elements.id.value = CodigoDoctor;
		document.forms.formEditar.elements.nombre.value = NombreDoctor;
		document.forms.formEditar.elements.apepaterno.value = ApePatDoctor;
		document.forms.formEditar.elements.apematerno.value = ApeMatDoctor;
		document.forms.formEditar.elements.email.value = EmailDoctor;
		document.forms.formEditar.elements.telefono.value = TlfDoctor;
		
		var admin = ""+BolAdminDoctor;
		
		if(admin == "true")
			document.forms.formEditar.elements.esadmin.checked  = "checked";
		else
			document.forms.formEditar.elements.esadmin.checked = "";
		
	}
	
	function eliminar(codigoPacienteEliminar) {
		document.forms.formEliminar.elements.codigoPacienteEliminar.value = codigoPacienteEliminar;
	}
</script>

<div class="footer">
	   	 <p>&nbsp;</p>
	     <p>&copy; Equipo Random UPC 2014 </p>
</div>